package com.slz3.business.module.drawManagement.draUserNumber.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.drawManagement.draUserNumber.domain.DraUserNumber;
import com.slz3.business.module.drawManagement.draUserNumber.domain.DraUserNumberCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class DraUserNumberResAtomic {

    static Mono<ServerResponse> add_$DraUserNumberUpdateLock(ServerRequest req, DraUserNumber draUserNumber) {
        return DraUserNumberResSafeValid.add(req, draUserNumber) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.add(req, draUserNumber);
    }

    public static Mono<ServerResponse> delete_$DraUserNumberUpdateLock(ServerRequest req, DraUserNumberCondition draUserNumberCondition) {
        return DraUserNumberResSafeValid.delete(req, draUserNumberCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.delete(req);
    }

    static Mono<ServerResponse> modify_$DraUserNumberUpdateLock(ServerRequest req, DraUserNumber draUserNumber) {
        return DraUserNumberResSafeValid.modify(req, draUserNumber) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.modify(req, draUserNumber);
    }

    static Mono<ServerResponse> info_$DraUserNumberUpdateLock(ServerRequest req) {
        return DraUserNumberResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.info(req);
    }

    public static Mono<ServerResponse> auditSubmit_$DraUserNumberUpdateLock(ServerRequest req, DraUserNumberCondition draUserNumberCondition) {
        return DraUserNumberResSafeValid.auditSubmit(req, draUserNumberCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.auditSubmit(req);
    }

    public static Mono<ServerResponse> audit_$DraUserNumberUpdateLock(ServerRequest req, DraUserNumberCondition draUserNumberCondition) {
        return DraUserNumberResSafeValid.audit(req, draUserNumberCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.audit(req);
    }

    public static Mono<ServerResponse> auditReject_$DraUserNumberUpdateLock(ServerRequest req, DraUserNumberCondition draUserNumberCondition) {
        return DraUserNumberResSafeValid.auditReject(req, draUserNumberCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.auditReject(req);
    }


    public static Mono<ServerResponse> usingEnable_$DraUserNumberUpdateLock(ServerRequest req, DraUserNumberCondition draUserNumberCondition) {
        return DraUserNumberResSafeValid.usingEnable(req, draUserNumberCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.usingEnable(req);
    }

    public static Mono<ServerResponse> usingDisable_$DraUserNumberUpdateLock(ServerRequest req, DraUserNumberCondition draUserNumberCondition) {
        return DraUserNumberResSafeValid.usingDisable(req, draUserNumberCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                DraUserNumberResExecutor.usingDisable(req);
    }
}
